Skip to content

fix(build): externalize onnxruntime-node for darwin-x64#13

Merged
katipally merged 1 commit into
mainfrom
fix-darwin-x64-build
Jun 23, 2026
Merged

fix(build): externalize onnxruntime-node for darwin-x64#13
katipally merged 1 commit into
mainfrom
fix-darwin-x64-build

Conversation

@katipally

Copy link
Copy Markdown
Owner

Why

The v2.0.9 release build failed on the darwin-x64 stable target — a blocker per RELEASING.md (all 5 stable builds must pass). nothing was published.

Root cause

onnxruntime-node@1.24.3 (pulled in by the on-device mic via @huggingface/transformers) ships bin/napi-v6/darwin/arm64 only — no darwin/x64 prebuilt. Its binding.js does require(\../bin/napi-v6/${process.platform}/${process.arch}/onnxruntime_binding.node`), so bundling on the Intel-mac runner couldn't resolve darwin/x64`.

Fix

Mark onnxruntime-node external for the darwin-x64 target only. The binary builds; the mic's lazy import("@huggingface/transformers") (mic.ts, already wrapped in .catch) degrades gracefully on Intel Macs — which can't run the native runtime anyway. All other targets keep bundling it (their bindings exist).

Verified

Cross-build of darwin-x64 locally now gets past the onnxruntime resolution (fails only on the x64 OpenTUI native lib absent on an arm64 host — present on the real Intel runner). Biome + typecheck clean.

🤖 Generated with Claude Code

…built)

onnxruntime-node@1.24.3 ships bin/napi-v6/darwin/arm64 only — no darwin/x64.
Its binding.js requires the host platform/arch .node, so bundling on the
Intel-mac runner couldn't resolve darwin/x64 and failed the stable build,
blocking the v2.0.9 release. Mark it external for darwin-x64 only; the mic's
lazy import("@huggingface/transformers") catches the missing module and
degrades gracefully (Intel Macs can't run the native runtime anyway).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@katipally katipally merged commit 9b01ed9 into main Jun 23, 2026
3 checks passed
@katipally katipally deleted the fix-darwin-x64-build branch June 23, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant